{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row animated fadeInRight">
        <div class="col-sm-4">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>个人资料</h5>
                </div>
                <div>
                    <div class="ibox-content no-padding border-left-right">
                        <img alt="image" class="img-responsive" src="/public/static/admin/assets/img/profile_big.jpg">
                    </div>
                    <div class="ibox-content profile-content">
                        <h4><strong>Kumer</strong></h4>
                        <p><i class="fa fa-map-marker"></i> 福建省龙岩市新罗区商务版块</p>
                        <h5>
                            关于我
                        </h5>
                        <p>
                            会点前端技术，div+css啊，jQuery，Bootstrap之类的，不是很精；主要研究后台开发（JAVA/PHP）；热爱生活，热爱互联网，热爱新技术，在不断的寻求新的突破。
                        </p>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>最新动态</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="collapse-link" href="javascript:location.replace(location.href);">
                            <i class="glyphicon glyphicon-refresh"></i>
                        </a>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div>
                        <div class="feed-activity-list" id="logDiv">
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>更新日志</h5>
                </div>
                <div class="ibox-content no-padding">
                    <div class="panel-body">
                        <div class="panel-group" id="version">
                            {foreach $vers as $vo}
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h5 class="panel-title">
                                        <a data-toggle="collapse" data-parent="#version" href="#v{$vo.id}">{$vo.ver}</a>
                                        <code class="pull-right">{$vo.ct |strtotime|date="Y.m.d",###}</code>
                                    </h5>
                                </div>
                                <div id="v{$vo.id}"
                                     class="panel-collapse collapse {if condition='$vo.id==$vid'}in{/if}">
                                    <div class="panel-body">
                                        {if condition="$vo.about!=''"}
                                        <div class="alert alert-warning">{$vo.about}</div>
                                        {/if}
                                        {$vo.content}
                                    </div>
                                </div>
                            </div>
                            {/foreach}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
    $(document).ready(function () {
        //设置加载日志
        loadLogs();
    });

    function loadLogs() {
        $.ajax({
            url: "/admin/sys.sys_log/loadLogs",
            type: 'get',
            dataType: 'json',
            success: function (res) {
                if (res.rc == 0) {
                    packagData(res.data)
                }
            }
        });
    }

    /**
     * 包装数据
     * @param data
     */
    function packagData(data) {
        var len = data.length;
        var str = "";
        for (var i = 0; i < len; i++) {
            str += '<div class="feed-element"><a href="profile.html#" class="pull-left">';
            str += '<img alt="image" class="img-circle" src="' + data[i].head_img + '"></a>';
            str += '<div class="media-body "><strong>' + data[i].user_name + '</strong> ' + data[i].event + '.<br>';
            str += '<small class="text-muted">' + data[i].ct + ' 来自 系统操作</small></div></div>';
        }
        document.getElementById('logDiv').innerHTML = str;
    }
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
